package com.sinosoft.bee.services.proposal.service.impl;

import com.sinosoft.bee.services.proposal.entity.proposal.ProposalProduct;
import com.sinosoft.bee.services.proposal.service.ProposalProductService;
import com.sinosoft.bee.services.proposal.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: TrickerL
 * @Description: bee
 * @Date: Create in 15:36 2018/5/16
 * @Modified By:
 */
@Service
@Transactional
public class ProposalProductServiceImpl implements ProposalProductService {
////    @Autowired
////    private AppntInfoMapper appntInfoMapper;
////    @Autowired
////    private InsuredInfoMapper insuredInfoMapper;
////    @Autowired
////    private ProposalMainMapper proposalMainMapper;



@Autowired
    private ProposalProductMapper proposalProductMapper;
////    @Autowired
////    private ProposalTrackMapper proposalTrackMapper;

    /**
     * 新增险种信息
     * @param proposalProduct
     * @return
     */
    @Override
    public Integer insertProposalProductInfo(ProposalProduct proposalProduct){
        return proposalProductMapper.insertProposalProduct(proposalProduct);
    }

    /**
     * 删除险种信息
     * @param proposalProduct
     * @return
     */
    @Override
    public Integer deleteProductInfo(ProposalProduct proposalProduct){
        return proposalProductMapper.deleteProposalMain(proposalProduct);
    }

    /**
     * 查询所有险种信息
     * @return
     */
    @Override
    public List<ProposalProduct> selectAllProductInfo(){
        return proposalProductMapper.selectAllProductInfo();
    }

    /**
     * 通过Code修改险种信息
     * @param proposalProduct
     */
    @Override
    public void updateByCode(ProposalProduct proposalProduct){
        proposalProductMapper.updateByCode(proposalProduct);
    }
}
